package com.sc.pb_user.pojo;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.util.Date;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 积分明细日志表
 * </p>
 *
 * @author PBObserver
 * @since 2025-09-19 05:02:16
 */
@Getter
@Setter
@TableName("pb_point_log")
public class PbPointLog {

    /**
     * 主键ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 逻辑外键，关联pb_user.id
     */
    @TableField("user_id")
    private Long userId;

    /**
     * 积分变动量，正数为增加，负数为减少
     */
    @TableField("point")
    private Integer point;

    /**
     * 变动类型：sport, exchange, member
     */
    @TableField("type")
    private String type;

    /**
     * 关联ID：如兑换订单ID
     */
    @TableField("related_id")
    private Long relatedId;

    /**
     * 变动时间
     */
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;

    /**
     * 备注
     */
    @TableField("remark")
    private String remark;
}
